Exploration of dataset


avos <- read_csv("data/avocado.csv") %>% 
  clean_names()
New names:Rows: 18249 Columns: 14── Column specification ──────────────────────────────────────────────────────────────────────────────────────────
Delimiter: ","
chr   (2): type, region
dbl  (11): ...1, AveragePrice, Total Volume, 4046, 4225, 4770, Total Bags, Small Bags, Large Bags, XLarge Bags...
date  (1): Date
ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
avos %>% 
  skim()
── Data Summary ────────────────────────
                           Values    
Name                       Piped data
Number of rows             18249     
Number of columns          14        
_______________________              
Column type frequency:               
  character                2         
  Date                     1         
  numeric                  11        
________________________             
Group variables            None      
avos %>% 
  count(type)

avos %>% 
  ggplot(aes(x = average_price)) +
  geom_histogram()


mod_alias <- lm(average_price ~ ., 
                data = avos)

mod_alias %>% 
  alias()
Model :
average_price ~ x1 + date + total_volume + x4046 + x4225 + x4770 + 
    total_bags + small_bags + large_bags + x_large_bags + type + 
    year + region

average_price looks a little right skewed, but not terribly, I think the normal distribution is acceptable

Test - Train

n_data <- nrow(avos)

# make a test index
test_index <- sample(1:n_data, size = n_data * 0.2)

# use test index to create test & training datasets
avos_test <- slice(avos, test_index)
avos_train <- slice(avos, -test_index)

Cleaning dataset


avos_train_tidy <- avos_train %>% 
  mutate(season = case_when(
    month(date) %in% c("3", "4", "5") ~ "spring",
    month(date) %in% c("6", "7", "8") ~ "summer",
    month(date) %in% c("9", "10", "11") ~ "autumn",
    TRUE ~ "winter"),
    is_organic = if_else(type == "organic", TRUE, FALSE),
    year = as.factor(year),
    proportion_x4046 = round(x4046 / total_volume * 100, 2),
    proportion_x4225 = round(x4225 / total_volume * 100, 2),
    proportion_x4770 = round(x4770 / total_volume * 100, 2),
    proportion_other = round((total_volume - {x4770 + x4225 + x4046}) / total_volume * 100, 2)
  ) %>% 
  select(-c(x1, date, total_bags, type, region, x4046, x4225, x4770))

1 Manual correlation assessment


avos_train_tidy %>% 
  ggpairs()

Looks like the primary predictor could be is_organic, start here.


avo_model1_org <- lm(average_price ~ is_organic,
                     data = avos_train_tidy)

avo_model1_org %>% 
  summary()

Call:
lm(formula = average_price ~ is_organic, data = avos_train_tidy)

Residuals:
     Min       1Q   Median       3Q      Max 
-1.21297 -0.20297 -0.03007  0.18703  1.59703 

Coefficients:
               Estimate Std. Error t value Pr(>|t|)    
(Intercept)    1.160074   0.003680  315.25   <2e-16 ***
is_organicTRUE 0.492893   0.005215   94.52   <2e-16 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.315 on 14598 degrees of freedom
Multiple R-squared:  0.3797,    Adjusted R-squared:  0.3796 
F-statistic:  8935 on 1 and 14598 DF,  p-value: < 2.2e-16
avo_model1_org %>% 
  autoplot()

Next best looks like it could be x4046, compare to ensure we have chosen the better primary

avo_model1_x4046 <- lm(average_price ~ proportion_x4046,
                     data = avos_train_tidy)

avo_model1_x4046 %>% 
  summary()

Call:
lm(formula = average_price ~ proportion_x4046, data = avos_train_tidy)

Residuals:
     Min       1Q   Median       3Q      Max 
-1.10976 -0.27688 -0.04555  0.22772  1.88576 

Coefficients:
                   Estimate Std. Error t value Pr(>|t|)    
(Intercept)       1.5520116  0.0045485  341.22   <2e-16 ***
proportion_x4046 -0.0064384  0.0001467  -43.89   <2e-16 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.3784 on 14598 degrees of freedom
Multiple R-squared:  0.1166,    Adjusted R-squared:  0.1165 
F-statistic:  1926 on 1 and 14598 DF,  p-value: < 2.2e-16
avo_model1_x4046 %>% 
  autoplot()

primary definitely confirmed to be is_organic, highest r2 by a large margin we’ll take that as our “champion”

Add the residuals from our chosen champion model and lets look at correlations again.

Not many good options, looks like the best options would be between proportion of x4225 or season or year

Start with proportion of x4225


avo_model2_x4225 <- lm(average_price ~ is_organic + proportion_x4225,
                      data = avos_train_tidy)

avo_model2_x4225 %>% 
  summary()

Call:
lm(formula = average_price ~ is_organic + proportion_x4225, data = avos_train_tidy)

Residuals:
     Min       1Q   Median       3Q      Max 
-1.11816 -0.19942 -0.02864  0.18456  1.62991 

Coefficients:
                  Estimate Std. Error t value Pr(>|t|)    
(Intercept)      1.0154316  0.0053738  188.96   <2e-16 ***
is_organicTRUE   0.5141196  0.0050625  101.55   <2e-16 ***
proportion_x4225 0.0038614  0.0001082   35.67   <2e-16 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.3043 on 14597 degrees of freedom
Multiple R-squared:  0.4289,    Adjusted R-squared:  0.4288 
F-statistic:  5481 on 2 and 14597 DF,  p-value: < 2.2e-16
avo_model2_x4225 %>% 
  autoplot()

Looking at season next


avo_model2_season <- lm(average_price ~ is_organic + season,
                      data = avos_train_tidy)

avo_model2_season %>% 
  summary()

Call:
lm(formula = average_price ~ is_organic + season, data = avos_train_tidy)

Residuals:
     Min       1Q   Median       3Q      Max 
-1.15803 -0.19896 -0.02216  0.18691  1.57197 

Coefficients:
                Estimate Std. Error t value Pr(>|t|)    
(Intercept)     1.290037   0.005782 223.110   <2e-16 ***
is_organicTRUE  0.495870   0.005018  98.817   <2e-16 ***
seasonspring   -0.187878   0.007169 -26.206   <2e-16 ***
seasonsummer   -0.071614   0.007382  -9.701   <2e-16 ***
seasonwinter   -0.236946   0.007056 -33.581   <2e-16 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.3032 on 14595 degrees of freedom
Multiple R-squared:  0.4331,    Adjusted R-squared:  0.4329 
F-statistic:  2788 on 4 and 14595 DF,  p-value: < 2.2e-16
avo_model2_season %>% 
  autoplot()

and finally year

avo_model2_year <- lm(average_price ~ is_organic + year,
                      data = avos_train_tidy)

avo_model2_year %>% 
  summary()

Call:
lm(formula = average_price ~ is_organic + year, data = avos_train_tidy)

Residuals:
     Min       1Q   Median       3Q      Max 
-1.32444 -0.18729 -0.01444  0.18556  1.65927 

Coefficients:
                Estimate Std. Error t value Pr(>|t|)    
(Intercept)     1.127290   0.005248 214.792  < 2e-16 ***
is_organicTRUE  0.496291   0.005103  97.260  < 2e-16 ***
year2016       -0.032848   0.006497  -5.056 4.34e-07 ***
year2017        0.140863   0.006477  21.749  < 2e-16 ***
year2018       -0.034974   0.010601  -3.299 0.000972 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.3083 on 14595 degrees of freedom
Multiple R-squared:  0.4138,    Adjusted R-squared:  0.4137 
F-statistic:  2576 on 4 and 14595 DF,  p-value: < 2.2e-16
avo_model2_year %>% 
  autoplot()

season beats out the other two by having a higher r2, and a lower residual error

Lets add residuals and compare again

Looks like the next best would be year or proportion of x4225, our graphs are looking a little split up, so I feel we are missing something.


avo_model3_year <- lm(average_price ~ is_organic + season + year,
                      data = avos_train_tidy)

avo_model3_year %>% 
  summary()

Call:
lm(formula = average_price ~ is_organic + season + year, data = avos_train_tidy)

Residuals:
     Min       1Q   Median       3Q      Max 
-1.26308 -0.19025 -0.01173  0.17844  1.53338 

Coefficients:
                Estimate Std. Error t value Pr(>|t|)    
(Intercept)     1.252612   0.006642 188.598  < 2e-16 ***
is_organicTRUE  0.496372   0.004867 101.995  < 2e-16 ***
seasonspring   -0.189362   0.007009 -27.017  < 2e-16 ***
seasonsummer   -0.070884   0.007159  -9.901  < 2e-16 ***
seasonwinter   -0.244534   0.007053 -34.671  < 2e-16 ***
year2016       -0.032363   0.006198  -5.221 1.80e-07 ***
year2017        0.143460   0.006180  23.214  < 2e-16 ***
year2018        0.066229   0.010501   6.307 2.93e-10 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.294 on 14592 degrees of freedom
Multiple R-squared:  0.4669,    Adjusted R-squared:  0.4667 
F-statistic:  1826 on 7 and 14592 DF,  p-value: < 2.2e-16
avo_model3_year %>% 
  autoplot()

NA
NA
NA

Compare to prop of x4225


avo_model3_x4225 <- lm(average_price ~ is_organic + season + proportion_x4225,
                      data = avos_train_tidy)

avo_model3_x4225 %>% 
  summary()

Call:
lm(formula = average_price ~ is_organic + season + proportion_x4225, 
    data = avos_train_tidy)

Residuals:
     Min       1Q   Median       3Q      Max 
-1.06941 -0.19049 -0.01579  0.17540  1.68635 

Coefficients:
                   Estimate Std. Error t value Pr(>|t|)    
(Intercept)       1.1486211  0.0067282  170.72   <2e-16 ***
is_organicTRUE    0.5140186  0.0048245  106.54   <2e-16 ***
seasonspring     -0.1893819  0.0068568  -27.62   <2e-16 ***
seasonsummer     -0.0743251  0.0070608  -10.53   <2e-16 ***
seasonwinter     -0.2334913  0.0067490  -34.60   <2e-16 ***
proportion_x4225  0.0038075  0.0001032   36.90   <2e-16 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.2899 on 14594 degrees of freedom
Multiple R-squared:  0.4815,    Adjusted R-squared:  0.4813 
F-statistic:  2710 on 5 and 14594 DF,  p-value: < 2.2e-16
avo_model3_x4225 %>% 
  autoplot()

prop x4225 looks good with some decent graphs and a higher r2 and lower residual standard error.

anova(avo_model3_x4225, avo_model2_season)
Analysis of Variance Table

Model 1: average_price ~ is_organic + season + proportion_x4225
Model 2: average_price ~ is_organic + season
  Res.Df    RSS Df Sum of Sq      F    Pr(>F)    
1  14594 1245.1                                  
2  14595 1362.8 -1   -117.75 1380.2 < 2.2e-16 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Looks like only maybe year could be useful here, but no others look particularly useful.


avo_model4_year <- lm(average_price ~ is_organic + season + proportion_x4225 + year,
                      data = avos_train_tidy)

avo_model4_year %>% 
  summary()

Call:
lm(formula = average_price ~ is_organic + season + proportion_x4225 + 
    year, data = avos_train_tidy)

Residuals:
     Min       1Q   Median       3Q      Max 
-1.17091 -0.17345 -0.01283  0.16620  1.58014 

Coefficients:
                   Estimate Std. Error t value Pr(>|t|)    
(Intercept)       1.0615695  0.0075453 140.693   <2e-16 ***
is_organicTRUE    0.5177711  0.0045875 112.864   <2e-16 ***
seasonspring     -0.1942966  0.0065720 -29.564   <2e-16 ***
seasonsummer     -0.0740825  0.0067125 -11.036   <2e-16 ***
seasonwinter     -0.2487260  0.0066130 -37.612   <2e-16 ***
proportion_x4225  0.0044979  0.0001003  44.834   <2e-16 ***
year2016         -0.0093886  0.0058336  -1.609    0.108    
year2017          0.1925335  0.0058965  32.652   <2e-16 ***
year2018          0.1327397  0.0099564  13.332   <2e-16 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.2756 on 14591 degrees of freedom
Multiple R-squared:  0.5315,    Adjusted R-squared:  0.5312 
F-statistic:  2069 on 8 and 14591 DF,  p-value: < 2.2e-16
avo_model4_year %>% 
  autoplot()

Seeing slight heteroskedasticity in the scale-location graph, and two layers in the Residuals vs Leverage graph, but a good line in Residuals vs fitted. Overall looks pretty good.

Lets add residuals and see if anything has improved.

Looks good, lets compare the model over both the train and test data


avos_test_tidy <- avos_test %>% 
  mutate(season = case_when(
    month(date) %in% c("3", "4", "5") ~ "spring",
    month(date) %in% c("6", "7", "8") ~ "summer",
    month(date) %in% c("9", "10", "11") ~ "autumn",
    TRUE ~ "winter"),
    is_organic = if_else(type == "organic", TRUE, FALSE),
    year = as.factor(year),
    proportion_x4046 = round(x4046 / total_volume * 100, 2),
    proportion_x4225 = round(x4225 / total_volume * 100, 2),
    proportion_x4770 = round(x4770 / total_volume * 100, 2),
    proportion_other = round((total_volume - {x4770 + x4225 + x4046}) / total_volume * 100, 2)
  ) %>% 
  select(-c(x1, date, total_bags, type, region, x4046, x4225, x4770))


train_model <- lm(average_price ~ is_organic + season + proportion_x4225 + year,
                      data = avos_train_tidy)

test_model <- lm(average_price ~ is_organic + season + proportion_x4225 + year,
                      data = avos_test_tidy)


train_model %>% 
  summary()

Call:
lm(formula = average_price ~ is_organic + season + proportion_x4225 + 
    year, data = avos_train_tidy)

Residuals:
     Min       1Q   Median       3Q      Max 
-1.17091 -0.17345 -0.01283  0.16620  1.58014 

Coefficients:
                   Estimate Std. Error t value Pr(>|t|)    
(Intercept)       1.0615695  0.0075453 140.693   <2e-16 ***
is_organicTRUE    0.5177711  0.0045875 112.864   <2e-16 ***
seasonspring     -0.1942966  0.0065720 -29.564   <2e-16 ***
seasonsummer     -0.0740825  0.0067125 -11.036   <2e-16 ***
seasonwinter     -0.2487260  0.0066130 -37.612   <2e-16 ***
proportion_x4225  0.0044979  0.0001003  44.834   <2e-16 ***
year2016         -0.0093886  0.0058336  -1.609    0.108    
year2017          0.1925335  0.0058965  32.652   <2e-16 ***
year2018          0.1327397  0.0099564  13.332   <2e-16 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.2756 on 14591 degrees of freedom
Multiple R-squared:  0.5315,    Adjusted R-squared:  0.5312 
F-statistic:  2069 on 8 and 14591 DF,  p-value: < 2.2e-16
test_model %>% 
  summary()

Call:
lm(formula = average_price ~ is_organic + season + proportion_x4225 + 
    year, data = avos_test_tidy)

Residuals:
     Min       1Q   Median       3Q      Max 
-1.08937 -0.16985 -0.00596  0.16503  1.22120 

Coefficients:
                   Estimate Std. Error t value Pr(>|t|)    
(Intercept)       1.0708973  0.0154140  69.476  < 2e-16 ***
is_organicTRUE    0.5172642  0.0093157  55.526  < 2e-16 ***
seasonspring     -0.1902042  0.0133691 -14.227  < 2e-16 ***
seasonsummer     -0.0858974  0.0136445  -6.295 3.43e-10 ***
seasonwinter     -0.2309263  0.0134299 -17.195  < 2e-16 ***
proportion_x4225  0.0042174  0.0001987  21.227  < 2e-16 ***
year2016         -0.0259408  0.0119034  -2.179   0.0294 *  
year2017          0.1845227  0.0119083  15.495  < 2e-16 ***
year2018          0.1515200  0.0203088   7.461 1.07e-13 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.2792 on 3640 degrees of freedom
Multiple R-squared:  0.5212,    Adjusted R-squared:  0.5201 
F-statistic: 495.3 on 8 and 3640 DF,  p-value: < 2.2e-16
train_model %>% 
  glance()
test_model %>% 
  glance()
NA

Well, looks like the model works (exceptionally) well on the test dataset, minor change in r2 and significant improvements in AIC and BIC, looks like we got lucky with our Test data.

K-fold validation


avos_full_tidy <- avos %>% 
  mutate(season = case_when(
    month(date) %in% c("3", "4", "5") ~ "spring",
    month(date) %in% c("6", "7", "8") ~ "summer",
    month(date) %in% c("9", "10", "11") ~ "autumn",
    TRUE ~ "winter"),
    is_organic = if_else(type == "organic", TRUE, FALSE),
    year = as.factor(year),
    proportion_x4046 = round(x4046 / total_volume * 100, 2),
    proportion_x4225 = round(x4225 / total_volume * 100, 2),
    proportion_x4770 = round(x4770 / total_volume * 100, 2),
    proportion_other = round((total_volume - {x4770 + x4225 + x4046}) / total_volume * 100, 2)
  ) %>% 
  select(-c(x1, date, total_bags, type, region, x4046, x4225, x4770))

cv_10fold <- trainControl(method = "cv", 
                          number = 10,
                          savePredictions = TRUE)

model_w_kfold <- train(average_price ~ is_organic + season + proportion_x4225 + year,
               data = avos_full_tidy,
               trControl = cv_10fold,
               method = "lm")

model_w_kfold$pred
model_w_kfold$resample

mean(model_w_kfold$resample$RMSE)
[1] 0.2763769
mean(model_w_kfold$resample$Rsquared)
[1] 0.5288694

2 Automated

leaps


regsubsets_exhaustive <- regsubsets(average_price ~ ., data = avos_train_tidy, nvmax = 8, method = "exhaustive")

sum_regsubsets_exhaustive <- summary(regsubsets_exhaustive)
sum_regsubsets_exhaustive
Subset selection object
Call: regsubsets.formula(average_price ~ ., data = avos_train_tidy, 
    nvmax = 8, method = "exhaustive")
15 Variables  (and intercept)
                 Forced in Forced out
total_volume         FALSE      FALSE
small_bags           FALSE      FALSE
large_bags           FALSE      FALSE
x_large_bags         FALSE      FALSE
year2016             FALSE      FALSE
year2017             FALSE      FALSE
year2018             FALSE      FALSE
seasonspring         FALSE      FALSE
seasonsummer         FALSE      FALSE
seasonwinter         FALSE      FALSE
is_organicTRUE       FALSE      FALSE
proportion_x4046     FALSE      FALSE
proportion_x4225     FALSE      FALSE
proportion_x4770     FALSE      FALSE
proportion_other     FALSE      FALSE
1 subsets of each size up to 8
Selection Algorithm: exhaustive
         total_volume small_bags large_bags x_large_bags year2016 year2017 year2018 seasonspring seasonsummer
1  ( 1 ) " "          " "        " "        " "          " "      " "      " "      " "          " "         
2  ( 1 ) " "          " "        " "        " "          " "      " "      " "      " "          " "         
3  ( 1 ) " "          " "        " "        " "          " "      "*"      " "      " "          " "         
4  ( 1 ) " "          " "        " "        " "          " "      "*"      " "      " "          " "         
5  ( 1 ) " "          " "        " "        " "          " "      "*"      " "      "*"          " "         
6  ( 1 ) " "          " "        " "        " "          " "      "*"      "*"      "*"          " "         
7  ( 1 ) " "          " "        " "        " "          " "      "*"      "*"      "*"          " "         
8  ( 1 ) " "          " "        " "        " "          " "      "*"      "*"      "*"          "*"         
         seasonwinter is_organicTRUE proportion_x4046 proportion_x4225 proportion_x4770 proportion_other
1  ( 1 ) " "          "*"            " "              " "              " "              " "             
2  ( 1 ) " "          "*"            " "              "*"              " "              " "             
3  ( 1 ) " "          "*"            " "              "*"              " "              " "             
4  ( 1 ) "*"          "*"            " "              "*"              " "              " "             
5  ( 1 ) "*"          "*"            " "              "*"              " "              " "             
6  ( 1 ) "*"          "*"            " "              "*"              " "              " "             
7  ( 1 ) "*"          "*"            "*"              " "              " "              "*"             
8  ( 1 ) "*"          "*"            "*"              " "              " "              "*"             
plot(regsubsets_exhaustive, scale = "adjr2")

plot(regsubsets_exhaustive, scale = "bic")

plot(sum_regsubsets_exhaustive$rsq, type = "b")


mod_noyear <- lm(average_price ~ . -year,
                 data = avos_train_tidy)

mod_w_year <- lm(average_price ~ .,
                 data = avos_train_tidy)

mod_noyear %>%
  summary()

Call:
lm(formula = average_price ~ . - year, data = avos_train_tidy)

Residuals:
     Min       1Q   Median       3Q      Max 
-1.06955 -0.18784 -0.01558  0.17550  1.68925 

Coefficients:
                   Estimate Std. Error t value Pr(>|t|)    
(Intercept)       2.552e+01  4.324e+01   0.590 0.554971    
total_volume     -2.276e-08  2.802e-09  -8.120 5.03e-16 ***
small_bags        9.949e-08  1.585e-08   6.276 3.57e-10 ***
large_bags       -8.104e-08  2.277e-08  -3.559 0.000373 ***
x_large_bags      6.273e-07  2.352e-07   2.667 0.007658 ** 
seasonspring     -1.894e-01  6.837e-03 -27.698  < 2e-16 ***
seasonsummer     -7.697e-02  7.064e-03 -10.896  < 2e-16 ***
seasonwinter     -2.329e-01  6.721e-03 -34.647  < 2e-16 ***
is_organicTRUE    5.076e-01  5.687e-03  89.268  < 2e-16 ***
proportion_x4046 -2.438e-01  4.324e-01  -0.564 0.572823    
proportion_x4225 -2.399e-01  4.324e-01  -0.555 0.578947    
proportion_x4770 -2.417e-01  4.324e-01  -0.559 0.576125    
proportion_other -2.436e-01  4.324e-01  -0.564 0.573081    
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.2886 on 14587 degrees of freedom
Multiple R-squared:  0.4867,    Adjusted R-squared:  0.4862 
F-statistic:  1152 on 12 and 14587 DF,  p-value: < 2.2e-16
mod_w_year %>% 
  summary()

Call:
lm(formula = average_price ~ ., data = avos_train_tidy)

Residuals:
     Min       1Q   Median       3Q      Max 
-1.13245 -0.17377 -0.01277  0.16404  1.55831 

Coefficients:
                   Estimate Std. Error t value Pr(>|t|)    
(Intercept)       7.728e+00  4.092e+01   0.189    0.850    
total_volume     -1.415e-08  2.673e-09  -5.295 1.21e-07 ***
small_bags        7.351e-08  1.504e-08   4.888 1.03e-06 ***
large_bags       -1.190e-07  2.160e-08  -5.509 3.66e-08 ***
x_large_bags      2.514e-07  2.230e-07   1.127    0.260    
year2016          8.308e-03  6.070e-03   1.369    0.171    
year2017          2.195e-01  6.385e-03  34.372  < 2e-16 ***
year2018          1.636e-01  1.034e-02  15.831  < 2e-16 ***
seasonspring     -1.991e-01  6.530e-03 -30.496  < 2e-16 ***
seasonsummer     -8.001e-02  6.687e-03 -11.965  < 2e-16 ***
seasonwinter     -2.511e-01  6.562e-03 -38.264  < 2e-16 ***
is_organicTRUE    5.458e-01  5.521e-03  98.856  < 2e-16 ***
proportion_x4046 -6.618e-02  4.092e-01  -0.162    0.872    
proportion_x4225 -6.241e-02  4.092e-01  -0.152    0.879    
proportion_x4770 -6.135e-02  4.092e-01  -0.150    0.881    
proportion_other -6.752e-02  4.092e-01  -0.165    0.869    
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.2731 on 14584 degrees of freedom
Multiple R-squared:  0.5402,    Adjusted R-squared:  0.5398 
F-statistic:  1142 on 15 and 14584 DF,  p-value: < 2.2e-16

glmulti

glmulti_fit <- glmulti(
  average_price ~ ., 
  data = avos_full_tidy,
  level = 2, # 2 = include pairwise interactions, 1 = main effects only (main effect = no pairwise interactions)
  minsize = 0, # no min size of model
  maxsize = -1, # -1 = no max size of model
  marginality = TRUE, # marginality here means the same as 'strongly hierarchical' interactions, i.e. include pairwise interactions only if both predictors present in the model as main effects.
  method = "g", # the problem is too large for exhaustive search, so search using a genetic algorithm
  crit = bic, # criteria for model selection is BIC value (lower is better)
  plotty = FALSE, # don't plot models as function runs
  report = TRUE, # do produce reports as function runs
  confsetsize = 10, # return best 100 solutions
  fitfunction = lm # fit using the `lm` function
)
Initialization...
TASK: Genetic algorithm in the candidate set.
Initialization...
Algorithm started...

After 10 generations:
Best model: average_price~1+year+total_volume+small_bags+large_bags+x_large_bags+season+is_organic+proportion_x4046+proportion_x4225+proportion_x4770+proportion_other+small_bags:total_volume+large_bags:small_bags+x_large_bags:small_bags+season:small_bags+season:large_bags+is_organic:total_volume+is_organic:small_bags+is_organic:x_large_bags+is_organic:season+proportion_x4046:large_bags+proportion_x4046:x_large_bags+proportion_x4046:season+proportion_x4225:total_volume+proportion_x4225:large_bags+proportion_x4225:x_large_bags+proportion_x4225:is_organic+proportion_x4225:proportion_x4046+proportion_x4770:small_bags+proportion_x4770:is_organic+proportion_other:total_volume+proportion_other:small_bags+proportion_other:large_bags+proportion_other:x_large_bags+proportion_other:season+proportion_other:is_organic+proportion_other:proportion_x4046+proportion_other:proportion_x4225+proportion_other:proportion_x4770+year:total_volume+year:season+year:proportion_x4225+year:proportion_other
Crit= 1526.33914481472
Mean crit= 1763.0713332705
Change in best IC: -8473.66085518528 / Change in mean IC: -8236.9286667295

After 20 generations:
Best model: average_price~1+year+total_volume+small_bags+large_bags+x_large_bags+season+is_organic+proportion_x4046+proportion_x4225+proportion_x4770+proportion_other+large_bags:small_bags+x_large_bags:small_bags+season:x_large_bags+is_organic:total_volume+is_organic:small_bags+is_organic:large_bags+is_organic:season+proportion_x4046:x_large_bags+proportion_x4046:is_organic+proportion_x4225:total_volume+proportion_x4225:large_bags+proportion_x4225:x_large_bags+proportion_x4225:is_organic+proportion_x4225:proportion_x4046+proportion_x4770:small_bags+proportion_x4770:is_organic+proportion_other:total_volume+proportion_other:small_bags+proportion_other:large_bags+proportion_other:x_large_bags+proportion_other:season+proportion_other:is_organic+proportion_other:proportion_x4046+proportion_other:proportion_x4225+proportion_other:proportion_x4770+year:total_volume+year:season+year:is_organic+year:proportion_x4046+year:proportion_x4770+year:proportion_other
Crit= 1364.78590523761
Mean crit= 1510.59893772864
Change in best IC: -161.553239577114 / Change in mean IC: -252.472395541855

After 30 generations:
Best model: average_price~1+year+total_volume+small_bags+large_bags+x_large_bags+season+is_organic+proportion_x4046+proportion_x4225+proportion_x4770+proportion_other+small_bags:total_volume+large_bags:small_bags+x_large_bags:small_bags+season:x_large_bags+is_organic:total_volume+is_organic:small_bags+is_organic:large_bags+is_organic:season+proportion_x4046:total_volume+proportion_x4046:small_bags+proportion_x4046:x_large_bags+proportion_x4225:total_volume+proportion_x4225:large_bags+proportion_x4225:x_large_bags+proportion_x4225:is_organic+proportion_x4225:proportion_x4046+proportion_x4770:small_bags+proportion_x4770:is_organic+proportion_other:small_bags+proportion_other:large_bags+proportion_other:x_large_bags+proportion_other:season+proportion_other:is_organic+proportion_other:proportion_x4046+proportion_other:proportion_x4225+proportion_other:proportion_x4770+year:total_volume+year:small_bags+year:season+year:is_organic+year:proportion_x4046+year:proportion_x4770+year:proportion_other
Crit= 1204.9271126019
Mean crit= 1331.48300680905
Change in best IC: -159.858792635707 / Change in mean IC: -179.115930919592

After 40 generations:
Best model: average_price~1+year+total_volume+small_bags+large_bags+x_large_bags+season+is_organic+proportion_x4046+proportion_x4225+proportion_x4770+proportion_other+large_bags:small_bags+x_large_bags:small_bags+is_organic:total_volume+is_organic:small_bags+is_organic:large_bags+is_organic:x_large_bags+is_organic:season+proportion_x4046:total_volume+proportion_x4046:small_bags+proportion_x4046:x_large_bags+proportion_x4225:total_volume+proportion_x4225:large_bags+proportion_x4225:x_large_bags+proportion_x4225:is_organic+proportion_x4225:proportion_x4046+proportion_x4770:small_bags+proportion_x4770:is_organic+proportion_other:small_bags+proportion_other:large_bags+proportion_other:x_large_bags+proportion_other:season+proportion_other:is_organic+proportion_other:proportion_x4046+proportion_other:proportion_x4225+proportion_other:proportion_x4770+year:total_volume+year:small_bags+year:season+year:is_organic+year:proportion_x4046+year:proportion_x4770+year:proportion_other
Crit= 1168.1482173108
Mean crit= 1235.08513725988
Change in best IC: -36.7788952910998 / Change in mean IC: -96.3978695491728

After 50 generations:
Best model: average_price~1+year+total_volume+small_bags+large_bags+x_large_bags+season+is_organic+proportion_x4046+proportion_x4225+proportion_x4770+proportion_other+large_bags:small_bags+x_large_bags:small_bags+is_organic:total_volume+is_organic:small_bags+is_organic:large_bags+is_organic:x_large_bags+is_organic:season+proportion_x4046:total_volume+proportion_x4046:small_bags+proportion_x4046:x_large_bags+proportion_x4225:total_volume+proportion_x4225:large_bags+proportion_x4225:x_large_bags+proportion_x4225:is_organic+proportion_x4225:proportion_x4046+proportion_x4770:small_bags+proportion_x4770:is_organic+proportion_other:small_bags+proportion_other:large_bags+proportion_other:x_large_bags+proportion_other:season+proportion_other:is_organic+proportion_other:proportion_x4046+proportion_other:proportion_x4225+proportion_other:proportion_x4770+year:total_volume+year:small_bags+year:large_bags+year:season+year:is_organic+year:proportion_x4046+year:proportion_x4770+year:proportion_other
Crit= 1137.50898935169
Mean crit= 1174.2094756892
Change in best IC: -30.639227959113 / Change in mean IC: -60.8756615706795

After 60 generations:
Best model: average_price~1+year+total_volume+small_bags+large_bags+x_large_bags+season+is_organic+proportion_x4046+proportion_x4225+proportion_x4770+proportion_other+large_bags:small_bags+x_large_bags:small_bags+is_organic:total_volume+is_organic:small_bags+is_organic:large_bags+is_organic:x_large_bags+is_organic:season+proportion_x4046:total_volume+proportion_x4046:small_bags+proportion_x4046:x_large_bags+proportion_x4225:total_volume+proportion_x4225:large_bags+proportion_x4225:x_large_bags+proportion_x4225:is_organic+proportion_x4225:proportion_x4046+proportion_x4770:small_bags+proportion_x4770:is_organic+proportion_x4770:proportion_x4225+proportion_other:small_bags+proportion_other:large_bags+proportion_other:x_large_bags+proportion_other:season+proportion_other:is_organic+proportion_other:proportion_x4046+proportion_other:proportion_x4225+proportion_other:proportion_x4770+year:total_volume+year:small_bags+year:large_bags+year:season+year:is_organic+year:proportion_x4046+year:proportion_x4770+year:proportion_other
Crit= 1136.32136915807
Mean crit= 1162.04045186509
Change in best IC: -1.18762019361952 / Change in mean IC: -12.1690238241029

After 70 generations:
Best model: average_price~1+year+total_volume+small_bags+large_bags+x_large_bags+season+is_organic+proportion_x4046+proportion_x4225+proportion_x4770+proportion_other+large_bags:small_bags+x_large_bags:small_bags+is_organic:total_volume+is_organic:small_bags+is_organic:large_bags+is_organic:x_large_bags+is_organic:season+proportion_x4046:total_volume+proportion_x4046:small_bags+proportion_x4046:x_large_bags+proportion_x4225:total_volume+proportion_x4225:large_bags+proportion_x4225:x_large_bags+proportion_x4225:is_organic+proportion_x4225:proportion_x4046+proportion_x4770:small_bags+proportion_x4770:is_organic+proportion_x4770:proportion_x4225+proportion_other:small_bags+proportion_other:large_bags+proportion_other:x_large_bags+proportion_other:season+proportion_other:is_organic+proportion_other:proportion_x4046+proportion_other:proportion_x4225+proportion_other:proportion_x4770+year:total_volume+year:small_bags+year:large_bags+year:season+year:is_organic+year:proportion_x4046+year:proportion_x4770+year:proportion_other
Crit= 1136.32136915807
Mean crit= 1162.04045186509
Change in best IC: 0 / Change in mean IC: 0

After 80 generations:
Best model: average_price~1+year+total_volume+small_bags+large_bags+x_large_bags+season+is_organic+proportion_x4046+proportion_x4225+proportion_x4770+proportion_other+large_bags:small_bags+x_large_bags:small_bags+is_organic:total_volume+is_organic:small_bags+is_organic:large_bags+is_organic:x_large_bags+is_organic:season+proportion_x4046:total_volume+proportion_x4046:small_bags+proportion_x4046:x_large_bags+proportion_x4225:total_volume+proportion_x4225:large_bags+proportion_x4225:x_large_bags+proportion_x4225:is_organic+proportion_x4225:proportion_x4046+proportion_x4770:small_bags+proportion_x4770:is_organic+proportion_x4770:proportion_x4225+proportion_other:small_bags+proportion_other:large_bags+proportion_other:x_large_bags+proportion_other:season+proportion_other:is_organic+proportion_other:proportion_x4046+proportion_other:proportion_x4225+proportion_other:proportion_x4770+year:total_volume+year:small_bags+year:large_bags+year:season+year:is_organic+year:proportion_x4046+year:proportion_x4770+year:proportion_other
Crit= 1136.32136915807
Mean crit= 1149.87597822841
Change in best IC: 0 / Change in mean IC: -12.1644736366804

After 90 generations:
Best model: average_price~1+year+total_volume+small_bags+large_bags+x_large_bags+season+is_organic+proportion_x4046+proportion_x4225+proportion_x4770+proportion_other+large_bags:small_bags+x_large_bags:small_bags+is_organic:total_volume+is_organic:small_bags+is_organic:large_bags+is_organic:x_large_bags+is_organic:season+proportion_x4046:total_volume+proportion_x4046:small_bags+proportion_x4046:x_large_bags+proportion_x4225:total_volume+proportion_x4225:large_bags+proportion_x4225:x_large_bags+proportion_x4225:is_organic+proportion_x4225:proportion_x4046+proportion_x4770:small_bags+proportion_x4770:is_organic+proportion_x4770:proportion_x4225+proportion_other:small_bags+proportion_other:large_bags+proportion_other:x_large_bags+proportion_other:season+proportion_other:is_organic+proportion_other:proportion_x4046+proportion_other:proportion_x4225+year:total_volume+year:small_bags+year:large_bags+year:season+year:is_organic+year:proportion_x4046+year:proportion_x4770+year:proportion_other
Crit= 1127.92760173167
Mean crit= 1138.90390064502
Change in best IC: -8.39376742640366 / Change in mean IC: -10.9720775833948

After 100 generations:
Best model: average_price~1+year+total_volume+small_bags+large_bags+x_large_bags+season+is_organic+proportion_x4046+proportion_x4225+proportion_x4770+proportion_other+large_bags:small_bags+x_large_bags:small_bags+is_organic:total_volume+is_organic:small_bags+is_organic:large_bags+is_organic:x_large_bags+is_organic:season+proportion_x4046:total_volume+proportion_x4046:small_bags+proportion_x4046:x_large_bags+proportion_x4225:total_volume+proportion_x4225:large_bags+proportion_x4225:x_large_bags+proportion_x4225:is_organic+proportion_x4225:proportion_x4046+proportion_x4770:small_bags+proportion_x4770:is_organic+proportion_x4770:proportion_x4225+proportion_other:small_bags+proportion_other:large_bags+proportion_other:x_large_bags+proportion_other:season+proportion_other:is_organic+proportion_other:proportion_x4046+proportion_other:proportion_x4225+year:total_volume+year:small_bags+year:large_bags+year:season+year:is_organic+year:proportion_x4046+year:proportion_x4770+year:proportion_other
Crit= 1127.92760173167
Mean crit= 1137.00414602676
Change in best IC: 0 / Change in mean IC: -1.89975461825543

After 110 generations:
Best model: average_price~1+year+total_volume+small_bags+large_bags+x_large_bags+season+is_organic+proportion_x4046+proportion_x4225+proportion_x4770+proportion_other+large_bags:small_bags+x_large_bags:small_bags+is_organic:total_volume+is_organic:small_bags+is_organic:large_bags+is_organic:x_large_bags+is_organic:season+proportion_x4046:total_volume+proportion_x4046:small_bags+proportion_x4046:x_large_bags+proportion_x4225:total_volume+proportion_x4225:large_bags+proportion_x4225:x_large_bags+proportion_x4225:is_organic+proportion_x4225:proportion_x4046+proportion_x4770:small_bags+proportion_x4770:is_organic+proportion_x4770:proportion_x4225+proportion_other:small_bags+proportion_other:large_bags+proportion_other:x_large_bags+proportion_other:season+proportion_other:is_organic+proportion_other:proportion_x4046+proportion_other:proportion_x4225+year:total_volume+year:small_bags+year:large_bags+year:season+year:is_organic+year:proportion_x4046+year:proportion_x4770+year:proportion_other
Crit= 1127.92760173167
Mean crit= 1135.88769697415
Change in best IC: 0 / Change in mean IC: -1.11644905261073

After 120 generations:
Best model: average_price~1+year+total_volume+small_bags+large_bags+x_large_bags+season+is_organic+proportion_x4046+proportion_x4225+proportion_x4770+proportion_other+large_bags:small_bags+x_large_bags:small_bags+is_organic:total_volume+is_organic:small_bags+is_organic:large_bags+is_organic:x_large_bags+is_organic:season+proportion_x4046:total_volume+proportion_x4046:small_bags+proportion_x4046:x_large_bags+proportion_x4225:total_volume+proportion_x4225:large_bags+proportion_x4225:x_large_bags+proportion_x4225:is_organic+proportion_x4225:proportion_x4046+proportion_x4770:small_bags+proportion_x4770:is_organic+proportion_x4770:proportion_x4225+proportion_other:small_bags+proportion_other:large_bags+proportion_other:x_large_bags+proportion_other:season+proportion_other:is_organic+proportion_other:proportion_x4046+proportion_other:proportion_x4225+year:total_volume+year:small_bags+year:large_bags+year:season+year:is_organic+year:proportion_x4046+year:proportion_x4770+year:proportion_other
Crit= 1127.92760173167
Mean crit= 1135.88769697415
Change in best IC: 0 / Change in mean IC: 0

After 130 generations:
Best model: average_price~1+year+total_volume+small_bags+large_bags+x_large_bags+season+is_organic+proportion_x4046+proportion_x4225+proportion_x4770+proportion_other+large_bags:small_bags+x_large_bags:small_bags+is_organic:total_volume+is_organic:small_bags+is_organic:large_bags+is_organic:x_large_bags+is_organic:season+proportion_x4046:total_volume+proportion_x4046:small_bags+proportion_x4046:x_large_bags+proportion_x4225:total_volume+proportion_x4225:large_bags+proportion_x4225:x_large_bags+proportion_x4225:is_organic+proportion_x4225:proportion_x4046+proportion_x4770:small_bags+proportion_x4770:is_organic+proportion_x4770:proportion_x4225+proportion_other:small_bags+proportion_other:large_bags+proportion_other:x_large_bags+proportion_other:season+proportion_other:is_organic+proportion_other:proportion_x4046+proportion_other:proportion_x4225+year:total_volume+year:small_bags+year:large_bags+year:season+year:is_organic+year:proportion_x4046+year:proportion_x4770+year:proportion_other
Crit= 1127.92760173167
Mean crit= 1135.88769697415
Change in best IC: 0 / Change in mean IC: 0

After 140 generations:
Best model: average_price~1+year+total_volume+small_bags+large_bags+x_large_bags+season+is_organic+proportion_x4046+proportion_x4225+proportion_x4770+proportion_other+large_bags:small_bags+x_large_bags:small_bags+is_organic:total_volume+is_organic:small_bags+is_organic:large_bags+is_organic:x_large_bags+is_organic:season+proportion_x4046:total_volume+proportion_x4046:small_bags+proportion_x4046:x_large_bags+proportion_x4225:total_volume+proportion_x4225:large_bags+proportion_x4225:x_large_bags+proportion_x4225:is_organic+proportion_x4225:proportion_x4046+proportion_x4770:small_bags+proportion_x4770:is_organic+proportion_x4770:proportion_x4225+proportion_other:small_bags+proportion_other:large_bags+proportion_other:x_large_bags+proportion_other:season+proportion_other:is_organic+proportion_other:proportion_x4046+proportion_other:proportion_x4225+year:total_volume+year:small_bags+year:large_bags+year:season+year:is_organic+year:proportion_x4046+year:proportion_x4770+year:proportion_other
Crit= 1127.92760173167
Mean crit= 1135.88769697415
Change in best IC: 0 / Change in mean IC: 0

After 150 generations:
Best model: average_price~1+year+total_volume+small_bags+large_bags+x_large_bags+season+is_organic+proportion_x4046+proportion_x4225+proportion_x4770+proportion_other+large_bags:small_bags+x_large_bags:small_bags+is_organic:total_volume+is_organic:small_bags+is_organic:large_bags+is_organic:x_large_bags+is_organic:season+proportion_x4046:total_volume+proportion_x4046:small_bags+proportion_x4046:x_large_bags+proportion_x4225:total_volume+proportion_x4225:large_bags+proportion_x4225:x_large_bags+proportion_x4225:is_organic+proportion_x4225:proportion_x4046+proportion_x4770:small_bags+proportion_x4770:is_organic+proportion_x4770:proportion_x4225+proportion_other:small_bags+proportion_other:large_bags+proportion_other:x_large_bags+proportion_other:season+proportion_other:is_organic+proportion_other:proportion_x4046+proportion_other:proportion_x4225+year:total_volume+year:small_bags+year:large_bags+year:season+year:is_organic+year:proportion_x4046+year:proportion_x4770+year:proportion_other
Crit= 1127.92760173167
Mean crit= 1135.61839385366
Change in best IC: 0 / Change in mean IC: -0.269303120497625

After 160 generations:
Best model: average_price~1+year+total_volume+small_bags+large_bags+x_large_bags+season+is_organic+proportion_x4046+proportion_x4225+proportion_x4770+proportion_other+large_bags:small_bags+x_large_bags:small_bags+is_organic:total_volume+is_organic:small_bags+is_organic:large_bags+is_organic:x_large_bags+is_organic:season+proportion_x4046:total_volume+proportion_x4046:small_bags+proportion_x4046:x_large_bags+proportion_x4225:total_volume+proportion_x4225:large_bags+proportion_x4225:x_large_bags+proportion_x4225:is_organic+proportion_x4225:proportion_x4046+proportion_x4770:small_bags+proportion_x4770:is_organic+proportion_x4770:proportion_x4225+proportion_other:small_bags+proportion_other:large_bags+proportion_other:x_large_bags+proportion_other:season+proportion_other:is_organic+proportion_other:proportion_x4046+proportion_other:proportion_x4225+year:total_volume+year:small_bags+year:large_bags+year:season+year:is_organic+year:proportion_x4046+year:proportion_x4770+year:proportion_other
Crit= 1127.92760173167
Mean crit= 1135.36544254766
Change in best IC: 0 / Change in mean IC: -0.252951305990337

After 170 generations:
Best model: average_price~1+year+total_volume+small_bags+large_bags+x_large_bags+season+is_organic+proportion_x4046+proportion_x4225+proportion_x4770+proportion_other+large_bags:small_bags+x_large_bags:small_bags+is_organic:total_volume+is_organic:small_bags+is_organic:large_bags+is_organic:x_large_bags+is_organic:season+proportion_x4046:total_volume+proportion_x4046:small_bags+proportion_x4046:x_large_bags+proportion_x4225:total_volume+proportion_x4225:large_bags+proportion_x4225:x_large_bags+proportion_x4225:is_organic+proportion_x4225:proportion_x4046+proportion_x4770:small_bags+proportion_x4770:is_organic+proportion_x4770:proportion_x4225+proportion_other:small_bags+proportion_other:large_bags+proportion_other:x_large_bags+proportion_other:season+proportion_other:is_organic+proportion_other:proportion_x4046+proportion_other:proportion_x4225+year:total_volume+year:small_bags+year:large_bags+year:season+year:is_organic+year:proportion_x4046+year:proportion_x4770+year:proportion_other
Crit= 1127.92760173167
Mean crit= 1135.36544254766
Change in best IC: 0 / Change in mean IC: 0

After 180 generations:
Best model: average_price~1+year+total_volume+small_bags+large_bags+x_large_bags+season+is_organic+proportion_x4046+proportion_x4225+proportion_x4770+proportion_other+large_bags:small_bags+x_large_bags:small_bags+is_organic:total_volume+is_organic:small_bags+is_organic:large_bags+is_organic:x_large_bags+is_organic:season+proportion_x4046:total_volume+proportion_x4046:small_bags+proportion_x4046:x_large_bags+proportion_x4225:total_volume+proportion_x4225:large_bags+proportion_x4225:x_large_bags+proportion_x4225:is_organic+proportion_x4225:proportion_x4046+proportion_x4770:small_bags+proportion_x4770:is_organic+proportion_x4770:proportion_x4225+proportion_other:small_bags+proportion_other:large_bags+proportion_other:x_large_bags+proportion_other:season+proportion_other:is_organic+proportion_other:proportion_x4046+proportion_other:proportion_x4225+year:total_volume+year:small_bags+year:large_bags+year:season+year:is_organic+year:proportion_x4046+year:proportion_x4770+year:proportion_other
Crit= 1127.92760173167
Mean crit= 1135.36544254766
Change in best IC: 0 / Change in mean IC: 0

After 190 generations:
Best model: average_price~1+year+total_volume+small_bags+large_bags+x_large_bags+season+is_organic+proportion_x4046+proportion_x4225+proportion_x4770+proportion_other+large_bags:small_bags+x_large_bags:small_bags+is_organic:total_volume+is_organic:small_bags+is_organic:large_bags+is_organic:x_large_bags+is_organic:season+proportion_x4046:total_volume+proportion_x4046:small_bags+proportion_x4046:x_large_bags+proportion_x4225:total_volume+proportion_x4225:large_bags+proportion_x4225:x_large_bags+proportion_x4225:is_organic+proportion_x4225:proportion_x4046+proportion_x4770:small_bags+proportion_x4770:is_organic+proportion_x4770:proportion_x4225+proportion_other:small_bags+proportion_other:large_bags+proportion_other:x_large_bags+proportion_other:season+proportion_other:is_organic+proportion_other:proportion_x4046+proportion_other:proportion_x4225+year:total_volume+year:small_bags+year:large_bags+year:season+year:is_organic+year:proportion_x4046+year:proportion_x4770+year:proportion_other
Crit= 1127.92760173167
Mean crit= 1135.36544254766
Change in best IC: 0 / Change in mean IC: 0

After 200 generations:
Best model: average_price~1+year+total_volume+small_bags+large_bags+x_large_bags+season+is_organic+proportion_x4046+proportion_x4225+proportion_x4770+proportion_other+large_bags:small_bags+x_large_bags:small_bags+is_organic:total_volume+is_organic:small_bags+is_organic:large_bags+is_organic:x_large_bags+is_organic:season+proportion_x4046:total_volume+proportion_x4046:small_bags+proportion_x4046:x_large_bags+proportion_x4225:total_volume+proportion_x4225:large_bags+proportion_x4225:x_large_bags+proportion_x4225:is_organic+proportion_x4225:proportion_x4046+proportion_x4770:small_bags+proportion_x4770:is_organic+proportion_x4770:proportion_x4225+proportion_other:small_bags+proportion_other:large_bags+proportion_other:x_large_bags+proportion_other:season+proportion_other:is_organic+proportion_other:proportion_x4046+proportion_other:proportion_x4225+year:total_volume+year:small_bags+year:large_bags+year:season+year:is_organic+year:proportion_x4046+year:proportion_x4770+year:proportion_other
Crit= 1127.92760173167
Mean crit= 1135.23244510159
Change in best IC: 0 / Change in mean IC: -0.132997446070249

After 210 generations:
Best model: average_price~1+year+total_volume+small_bags+large_bags+x_large_bags+season+is_organic+proportion_x4046+proportion_x4225+proportion_x4770+proportion_other+large_bags:small_bags+x_large_bags:small_bags+is_organic:total_volume+is_organic:small_bags+is_organic:large_bags+is_organic:x_large_bags+is_organic:season+proportion_x4046:total_volume+proportion_x4046:small_bags+proportion_x4046:x_large_bags+proportion_x4225:total_volume+proportion_x4225:large_bags+proportion_x4225:x_large_bags+proportion_x4225:is_organic+proportion_x4225:proportion_x4046+proportion_x4770:small_bags+proportion_x4770:is_organic+proportion_x4770:proportion_x4225+proportion_other:small_bags+proportion_other:large_bags+proportion_other:x_large_bags+proportion_other:season+proportion_other:is_organic+proportion_other:proportion_x4046+proportion_other:proportion_x4225+year:total_volume+year:small_bags+year:large_bags+year:season+year:is_organic+year:proportion_x4046+year:proportion_x4770+year:proportion_other
Crit= 1127.92760173167
Mean crit= 1135.23244510159
Change in best IC: 0 / Change in mean IC: 0

After 220 generations:
Best model: average_price~1+year+total_volume+small_bags+large_bags+x_large_bags+season+is_organic+proportion_x4046+proportion_x4225+proportion_x4770+proportion_other+large_bags:small_bags+x_large_bags:small_bags+is_organic:total_volume+is_organic:small_bags+is_organic:large_bags+is_organic:x_large_bags+is_organic:season+proportion_x4046:total_volume+proportion_x4046:small_bags+proportion_x4046:x_large_bags+proportion_x4225:total_volume+proportion_x4225:large_bags+proportion_x4225:x_large_bags+proportion_x4225:is_organic+proportion_x4225:proportion_x4046+proportion_x4770:small_bags+proportion_x4770:is_organic+proportion_x4770:proportion_x4225+proportion_other:small_bags+proportion_other:large_bags+proportion_other:x_large_bags+proportion_other:season+proportion_other:is_organic+proportion_other:proportion_x4046+proportion_other:proportion_x4225+year:total_volume+year:small_bags+year:large_bags+year:season+year:is_organic+year:proportion_x4046+year:proportion_x4770+year:proportion_other
Crit= 1127.92760173167
Mean crit= 1135.23244510159
Change in best IC: 0 / Change in mean IC: 0

After 230 generations:
Best model: average_price~1+year+total_volume+small_bags+large_bags+x_large_bags+season+is_organic+proportion_x4046+proportion_x4225+proportion_x4770+proportion_other+large_bags:small_bags+x_large_bags:small_bags+is_organic:total_volume+is_organic:small_bags+is_organic:large_bags+is_organic:x_large_bags+is_organic:season+proportion_x4046:total_volume+proportion_x4046:small_bags+proportion_x4046:x_large_bags+proportion_x4225:total_volume+proportion_x4225:large_bags+proportion_x4225:x_large_bags+proportion_x4225:is_organic+proportion_x4225:proportion_x4046+proportion_x4770:small_bags+proportion_x4770:is_organic+proportion_x4770:proportion_x4225+proportion_other:small_bags+proportion_other:large_bags+proportion_other:x_large_bags+proportion_other:season+proportion_other:is_organic+proportion_other:proportion_x4046+proportion_other:proportion_x4225+year:total_volume+year:small_bags+year:large_bags+year:season+year:is_organic+year:proportion_x4046+year:proportion_x4770+year:proportion_other
Crit= 1127.92760173167
Mean crit= 1134.73976931801
Change in best IC: 0 / Change in mean IC: -0.49267578358581

After 240 generations:
Best model: average_price~1+year+total_volume+small_bags+large_bags+x_large_bags+season+is_organic+proportion_x4046+proportion_x4225+proportion_x4770+proportion_other+large_bags:small_bags+x_large_bags:small_bags+is_organic:total_volume+is_organic:small_bags+is_organic:large_bags+is_organic:x_large_bags+is_organic:season+proportion_x4046:total_volume+proportion_x4046:small_bags+proportion_x4046:x_large_bags+proportion_x4225:total_volume+proportion_x4225:large_bags+proportion_x4225:x_large_bags+proportion_x4225:is_organic+proportion_x4225:proportion_x4046+proportion_x4770:small_bags+proportion_x4770:is_organic+proportion_x4770:proportion_x4225+proportion_other:small_bags+proportion_other:large_bags+proportion_other:x_large_bags+proportion_other:season+proportion_other:is_organic+proportion_other:proportion_x4046+proportion_other:proportion_x4225+year:total_volume+year:small_bags+year:large_bags+year:season+year:is_organic+year:proportion_x4046+year:proportion_x4770+year:proportion_other
Crit= 1127.92760173167
Mean crit= 1134.73976931801
Change in best IC: 0 / Change in mean IC: 0

After 250 generations:
Best model: average_price~1+year+total_volume+small_bags+large_bags+x_large_bags+season+is_organic+proportion_x4046+proportion_x4225+proportion_x4770+proportion_other+large_bags:small_bags+x_large_bags:small_bags+is_organic:total_volume+is_organic:small_bags+is_organic:large_bags+is_organic:x_large_bags+is_organic:season+proportion_x4046:total_volume+proportion_x4046:small_bags+proportion_x4046:x_large_bags+proportion_x4225:total_volume+proportion_x4225:large_bags+proportion_x4225:x_large_bags+proportion_x4225:is_organic+proportion_x4225:proportion_x4046+proportion_x4770:small_bags+proportion_x4770:is_organic+proportion_x4770:proportion_x4225+proportion_other:small_bags+proportion_other:large_bags+proportion_other:x_large_bags+proportion_other:season+proportion_other:is_organic+proportion_other:proportion_x4046+proportion_other:proportion_x4225+year:total_volume+year:small_bags+year:large_bags+year:season+year:is_organic+year:proportion_x4046+year:proportion_x4770+year:proportion_other
Crit= 1127.92760173167
Mean crit= 1134.085412637
Change in best IC: 0 / Change in mean IC: -0.654356681010313

After 260 generations:
Best model: average_price~1+year+total_volume+small_bags+large_bags+x_large_bags+season+is_organic+proportion_x4046+proportion_x4225+proportion_x4770+proportion_other+large_bags:small_bags+x_large_bags:small_bags+is_organic:total_volume+is_organic:small_bags+is_organic:large_bags+is_organic:x_large_bags+is_organic:season+proportion_x4046:total_volume+proportion_x4046:small_bags+proportion_x4046:x_large_bags+proportion_x4225:total_volume+proportion_x4225:large_bags+proportion_x4225:x_large_bags+proportion_x4225:is_organic+proportion_x4225:proportion_x4046+proportion_x4770:small_bags+proportion_x4770:is_organic+proportion_x4770:proportion_x4225+proportion_other:small_bags+proportion_other:large_bags+proportion_other:x_large_bags+proportion_other:season+proportion_other:is_organic+proportion_other:proportion_x4046+proportion_other:proportion_x4225+year:total_volume+year:small_bags+year:large_bags+year:season+year:is_organic+year:proportion_x4046+year:proportion_x4770+year:proportion_other
Crit= 1127.92760173167
Mean crit= 1133.84663092128
Change in best IC: 0 / Change in mean IC: -0.238781715720734

After 270 generations:
Best model: average_price~1+year+total_volume+small_bags+large_bags+x_large_bags+season+is_organic+proportion_x4046+proportion_x4225+proportion_x4770+proportion_other+large_bags:small_bags+x_large_bags:small_bags+is_organic:total_volume+is_organic:small_bags+is_organic:large_bags+is_organic:x_large_bags+is_organic:season+proportion_x4046:total_volume+proportion_x4046:small_bags+proportion_x4046:x_large_bags+proportion_x4225:total_volume+proportion_x4225:large_bags+proportion_x4225:x_large_bags+proportion_x4225:is_organic+proportion_x4225:proportion_x4046+proportion_x4770:small_bags+proportion_x4770:is_organic+proportion_x4770:proportion_x4225+proportion_other:small_bags+proportion_other:large_bags+proportion_other:x_large_bags+proportion_other:season+proportion_other:is_organic+proportion_other:proportion_x4046+proportion_other:proportion_x4225+year:total_volume+year:small_bags+year:large_bags+year:season+year:is_organic+year:proportion_x4046+year:proportion_x4770+year:proportion_other
Crit= 1127.92760173167
Mean crit= 1133.84663092128
Change in best IC: 0 / Change in mean IC: 0

After 280 generations:
Best model: average_price~1+year+total_volume+small_bags+large_bags+x_large_bags+season+is_organic+proportion_x4046+proportion_x4225+proportion_x4770+proportion_other+large_bags:small_bags+x_large_bags:small_bags+is_organic:total_volume+is_organic:small_bags+is_organic:large_bags+is_organic:x_large_bags+is_organic:season+proportion_x4046:total_volume+proportion_x4046:small_bags+proportion_x4046:x_large_bags+proportion_x4225:total_volume+proportion_x4225:large_bags+proportion_x4225:x_large_bags+proportion_x4225:is_organic+proportion_x4225:proportion_x4046+proportion_x4770:small_bags+proportion_x4770:is_organic+proportion_x4770:proportion_x4225+proportion_other:small_bags+proportion_other:large_bags+proportion_other:x_large_bags+proportion_other:season+proportion_other:is_organic+proportion_other:proportion_x4046+proportion_other:proportion_x4225+year:total_volume+year:small_bags+year:large_bags+year:season+year:is_organic+year:proportion_x4046+year:proportion_x4770+year:proportion_other
Crit= 1127.92760173167
Mean crit= 1133.84663092128
Change in best IC: 0 / Change in mean IC: 0

After 290 generations:
Best model: average_price~1+year+total_volume+small_bags+large_bags+x_large_bags+season+is_organic+proportion_x4046+proportion_x4225+proportion_x4770+proportion_other+large_bags:small_bags+x_large_bags:small_bags+is_organic:total_volume+is_organic:small_bags+is_organic:large_bags+is_organic:x_large_bags+is_organic:season+proportion_x4046:total_volume+proportion_x4046:small_bags+proportion_x4046:x_large_bags+proportion_x4225:total_volume+proportion_x4225:large_bags+proportion_x4225:x_large_bags+proportion_x4225:is_organic+proportion_x4225:proportion_x4046+proportion_x4770:small_bags+proportion_x4770:is_organic+proportion_x4770:proportion_x4225+proportion_other:small_bags+proportion_other:large_bags+proportion_other:x_large_bags+proportion_other:season+proportion_other:is_organic+proportion_other:proportion_x4046+proportion_other:proportion_x4225+year:total_volume+year:small_bags+year:large_bags+year:season+year:is_organic+year:proportion_x4046+year:proportion_x4770+year:proportion_other
Crit= 1127.92760173167
Mean crit= 1133.84663092128
Change in best IC: 0 / Change in mean IC: 0

After 300 generations:
Best model: average_price~1+year+total_volume+small_bags+large_bags+x_large_bags+season+is_organic+proportion_x4046+proportion_x4225+proportion_x4770+proportion_other+large_bags:small_bags+x_large_bags:small_bags+is_organic:total_volume+is_organic:small_bags+is_organic:large_bags+is_organic:x_large_bags+is_organic:season+proportion_x4046:total_volume+proportion_x4046:small_bags+proportion_x4046:x_large_bags+proportion_x4225:total_volume+proportion_x4225:large_bags+proportion_x4225:x_large_bags+proportion_x4225:is_organic+proportion_x4225:proportion_x4046+proportion_x4770:small_bags+proportion_x4770:is_organic+proportion_x4770:proportion_x4225+proportion_other:small_bags+proportion_other:large_bags+proportion_other:x_large_bags+proportion_other:season+proportion_other:is_organic+proportion_other:proportion_x4046+proportion_other:proportion_x4225+year:total_volume+year:small_bags+year:large_bags+year:season+year:is_organic+year:proportion_x4046+year:proportion_x4770+year:proportion_other
Crit= 1127.92760173167
Mean crit= 1133.84663092128
Change in best IC: 0 / Change in mean IC: 0

After 310 generations:
Best model: average_price~1+year+total_volume+small_bags+large_bags+x_large_bags+season+is_organic+proportion_x4046+proportion_x4225+proportion_x4770+proportion_other+large_bags:small_bags+x_large_bags:small_bags+is_organic:total_volume+is_organic:small_bags+is_organic:large_bags+is_organic:x_large_bags+is_organic:season+proportion_x4046:total_volume+proportion_x4046:small_bags+proportion_x4046:x_large_bags+proportion_x4225:total_volume+proportion_x4225:large_bags+proportion_x4225:x_large_bags+proportion_x4225:is_organic+proportion_x4225:proportion_x4046+proportion_x4770:small_bags+proportion_x4770:is_organic+proportion_x4770:proportion_x4225+proportion_other:small_bags+proportion_other:large_bags+proportion_other:x_large_bags+proportion_other:season+proportion_other:is_organic+proportion_other:proportion_x4046+proportion_other:proportion_x4225+year:total_volume+year:small_bags+year:large_bags+year:season+year:is_organic+year:proportion_x4046+year:proportion_x4770+year:proportion_other
Crit= 1127.92760173167
Mean crit= 1133.84663092128
Improvements in best and average IC have bebingo en below the specified goals.
Algorithm is declared to have converged.
Completed.
LS0tCnRpdGxlOiAiUiBOb3RlYm9vayIKb3V0cHV0OiBodG1sX25vdGVib29rCi0tLQoKCmBgYHtyLCBtZXNzYWdlPUZBTFNFLCBlY2hvPUZBTFNFfQpsaWJyYXJ5KHJlbGFpbXBvKQpsaWJyYXJ5KHRpZHl2ZXJzZSkKbGlicmFyeShtb2RlbHIpCmxpYnJhcnkoamFuaXRvcikKbGlicmFyeShsZWFwcykKbGlicmFyeShHR2FsbHkpCmxpYnJhcnkoY2FyZXQpCmxpYnJhcnkoZ2dmb3J0aWZ5KQpsaWJyYXJ5KHNraW1yKQpsaWJyYXJ5KGx1YnJpZGF0ZSkKbGlicmFyeShnbG11bHRpKQpsaWJyYXJ5KGJyb29tKQpgYGAKCiMgRXhwbG9yYXRpb24gb2YgZGF0YXNldAoKYGBge3J9Cgphdm9zIDwtIHJlYWRfY3N2KCJkYXRhL2F2b2NhZG8uY3N2IikgJT4lIAogIGNsZWFuX25hbWVzKCkKCmF2b3MgJT4lIAogIHNraW0oKQoKYXZvcyAlPiUgCiAgY291bnQodHlwZSkKCmF2b3MgJT4lIAogIGdncGxvdChhZXMoeCA9IGF2ZXJhZ2VfcHJpY2UpKSArCiAgZ2VvbV9oaXN0b2dyYW0oKQoKbW9kX2FsaWFzIDwtIGxtKGF2ZXJhZ2VfcHJpY2UgfiAuLCAKICAgICAgICAgICAgICAgIGRhdGEgPSBhdm9zKQoKbW9kX2FsaWFzICU+JSAKICBhbGlhcygpCgpgYGAKCmF2ZXJhZ2VfcHJpY2UgbG9va3MgYSBsaXR0bGUgcmlnaHQgc2tld2VkLCBidXQgbm90IHRlcnJpYmx5LCBJIHRoaW5rIHRoZSBub3J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